using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace miciv
{
    public class StringTable
    {
        protected Hashtable m_htblStrings;

        public StringTable()
        {
            this.m_htblStrings = new Hashtable();
        }

        public bool AddString(string _strID, StringInfo _stringInfo)
        {
            if (false == this.m_htblStrings.ContainsKey(_strID))
            {
                this.m_htblStrings.Add(_strID, _stringInfo);
                return true;
            }
            return false;
        }

        public void RemoveString(string _strID)
        {
            if (false != this.m_htblStrings.ContainsKey(_strID))
            {
                this.m_htblStrings.Remove(_strID);
            }
        }

        public StringInfo GetString(string _strID)
        {
            if (false != this.m_htblStrings.ContainsKey(_strID))
            {
                return this.m_htblStrings[_strID] as StringInfo;
            }
            return null;
        }
    }
}
